import instance from "./request";

// 获取表格数据
export const getTableData = () => {
  return instance.get("/dingDan")
}
// 删除表格数据
export const deleteTableData = (id: number) => {
  return instance.delete(`/dingDan/${id}`)
}
// 新增表格数据
export const addTableData = (data: any) => {
  return instance.post("/dingDan", data)
}
// 修改表格数据
export const updateTableData=(data:any)=>{
   return instance.patch(`/dingDan/${data.id}`,data)
}
// 获取表格数据详情
export const getTableDataDetail = (body:any) => {
  return instance.get(`/dingDan`,{
    params: {}
  })
}
export const searchTableDate=(title:any,Associated_customer:any,stage:any)=>{
  return instance.get('/dingDan',{
    params:{
      title_like:title,
      Associated_customer_like:Associated_customer,
      stage
    }
  })
}